# Contributor: Bart Ribbers <bribbers@disroot.org>
# Contributor: Simon Zeni <simon@bl4ckb0ne.ca>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=vulkan-loader
_pkgname=Vulkan-Loader
pkgver=1.3.216.0
_pkgver=sdk-$pkgver
pkgrel=0
arch="all"
url="https://www.khronos.org/vulkan"
pkgdesc="Vulkan Installable Client Driver (ICD) Loader"
license="Apache-2.0"
depends_dev="vulkan-headers"
makedepends="$depends_dev
	cmake
	libx11-dev
	libxrandr-dev
	python3
	samurai
	wayland-dev
	"
source="https://github.com/khronosgroup/vulkan-loader/archive/refs/tags/$_pkgver/vulkan-loader-$_pkgver.tar.gz"
subpackages="$pkgname-dev $pkgname-dbg"
builddir="$srcdir/$_pkgname-$_pkgver"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_INSTALL_SYSCONFDIR=/etc \
		-DCMAKE_INSTALL_DATADIR=share \
		-DCMAKE_SKIP_RPATH=True \
		-DVULKAN_HEADERS_INSTALL_DIR=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
2acc3385c68c6c256febf2d66f3ae39dc7e60dca98fcedd9239ead163b9580c7bb226a4e4108da742c96e158e1c0ca3fc6ce4dec77225c7f832baf8b4f54ddbd  vulkan-loader-sdk-1.3.216.0.tar.gz
"
